#--------------------------------------------------
#
#	Name      : Lua
#	Purpose   : StrongED mode file for RiscLua
#	Author    : Gavin Wraith
#	Licence   : Freeware
#	Version   : 0.02, 02/04/03
#
#-------------------------------------------

ID_FirstChar	A-Za-z_
ID_Middle	A-Za-z_0-9

SyntaxOptions
	SingleQuote	Yes
	DoubleQuote	Yes
	QuoteChar	\
	QuoteQuote	No
	SplitString	Yes
End

SyntaxComment 1
	Type		Oneline
	StartWith	--
End

SyntaxComment 2
	Type		OneLine
	StartWith	#!
End	

SyntaxWords Group1 case
        and break do else elseif end false for function global
        if in local nil not or repeat return then true until while

End

Syntaxwords Group2 case
        string table math io os debug coroutine bit riscos
End

SyntaxWords Group3 case
	assert call collectgarbage
	dofile error foreach foreachvar getfenv getn
	gettagmethod getglobals getmetatable getmode 
	gcinfo ipairs loadfile loadstring next pairs pcall print
	rawget rawset require
	setfenv setmetatable setmode
	tonumber tostring type unpack sys
End

Search
	_MarkWord	{AlphaNum|"_"}+ | {Punct}+
	luafunc		"function"  @0
	luafunc2	CW {" "} "=" {" "} "function" | "function" {" "}+ CW
#	luafile		{'A-Za-z_0-9.<>$:!?+\-/~'}+

End

Functions

	Key	F10
	Menu	Run  F10
	Icon	Run
	Select	SetTmp() SaveRun("Lua <Tmp$Path>.<Tmp$Leaf>")
	Help	Save and run (Adjust- in Taskwindow)

	Adjust	SetTmp() SaveRun("Taskwindow \"Lua <Tmp$Path>.<Tmp$Leaf>\" -quit")

	Key	F2
	Menu	List of functions F2
	Icon	LoF
	Select	ListOfFound(luafunc,,,NoLine)
	Help	Hlua_lof

	Key	^G
	Menu	Goto function
	Icon	goto
	Select	Push GotoFound (luafunc2,All,Whole,NoLine,Case)
	Help	HBa_go

	Key	^G 2
	Adjust	Pop

End
